package com.nbsaas.boot.cms.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.Comment;

@CreateByUser
@ComposeView
@Data
@FormAnnotation(title = "文章标签关联", model = "文章标签关联")
@Entity
@Table(name = "bs_article_tag_relation")
@Comment("文章标签关联表")
public class ArticleTagRelation extends AbstractEntity {

    @Comment("文章ID")
    @FormField(title = "文章ID", sortNum = "1", grid = true, required = true)
    @Column(nullable = false)
    private Long articleId;

    @Comment("标签ID")
    @FormField(title = "标签ID", sortNum = "2", grid = true, required = true)
    @Column(nullable = false)
    private Long tagId;

    @Comment("排序")
    @FormField(title = "排序", sortNum = "3", grid = true, type = InputType.el_input_number, sort = true)
    private Integer sort;
} 